package edu.ahut.designpattern.demo.v2;

public class Pillar {
    protected Shape base;
    double height;

    public Pillar(Shape base, double height) {
        this.base = base;
        this.height = height;
    }

    public Shape getBase() {
        return base;
    }

    public void setBase(Shape base) {
        this.base = base;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getVolume() {
        return height*base.getArea();
    }
}
